//Nathan Popham
//4003-573-01: Procedural Shading
//Lab 3
//

varying vec3 N;

uniform sampler2D myTexture;

void main()
{
    vec3 L =  normalize(vec3((gl_LightSource[0].position)));
    
    float NdotL = min(max(dot(N, L), 0.0), .999);     
   

    vec3 color = vec3(texture2D(myTexture, vec2(NdotL, gl_TexCoord[0].t)));

	gl_FragColor = vec4(color, 1.0);
    //gl_FragColor = vec4(1.0, 0, 0, 1.0);
} 
